/* Name:     Nguyen Minh Trung - SE90088
 * Class:    SE0691
 * DueDate:  15/11/2012
 */

package Connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Trung
 */
public class ConnectionUtitility {
    public static Connection openConnection() throws ClassNotFoundException, SQLException{
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
        "databaseName=PersonalFinance;user=sa;password=1234;";
        Connection con = DriverManager.getConnection(connectionUrl);
        return con;
    }
}
